package com.dmy.chat.server.netty.message;

import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.Map;

/**
 * create by YCQ for 2020/1/13 9:21
 */
@Data
public class Messages implements Serializable {

    private int cmd;
    private String content;
    private String msgType; // 2 图片  1或空为文本
    private Date date;
    private String sender;
    private String receive;
    private Map<String,Object> extAttr;
    private String msgId;

    public <T>T getExtAttribute(String key){
        return (T)extAttr.get(key);
    }

}
